{include file="public:header" /}
<div class="subnav">
    <div class="content_menu ib_a blue line_x">
        <a href="{:url('index',['type'=>$type])}"><em>返回列表</em></a><span>|</span>
        <a href="{:url('add')}" {if condition="$type eq 1"}class="on"{/if}><em>添加文本回复</em></a><span>|</span>
        <a href="{:url('add',['type'=>2])}" {if condition="$type eq 2"}class="on"{/if}><em>添加图文回复</em></a><span>|</span>
        <a href="{:url('add',['type'=>3])}" {if condition="$type eq 3"}class="on"{/if}><em>添加多图文回复</em></a>
    </div>
</div>
<!--添加文本回复-->
<form id="info_form" action="{:url('addDo')}" method="post" enctype="multipart/form-data">
    <div class="pad_lr_10">
        <div class="col_tab">
            <ul class="J_tabs tab_but cu_li">
                <li class="current">添加文本回复</li>
            </ul>
            <div class="J_panes">
                <div class="content_list pad_10">
                    <table width="100%" cellspacing="0" class="table_form">
                        <tr>
                            <th>关键词 :</th>
                            <td>
                                <input type="text" name="keyword" id="J_title" class="input-text" size="50">
                            </td>
                        </tr>

                        <tr>
                            <th>回复内容 :</th>
                            <td>
                                <textarea name="data" id="data" style="width:500px;height:50px;resize:none;"></textarea>
                            </td>
                        </tr>

                    </table>
                </div>

            </div>
            <div class="mt10"><input type="submit" value="提交" id="dosubmit" name="" class="btn btn_submit" style="margin:0 0 10px 100px;"><br /><br /><br /></div>
        </div>
    </div>
</form>
{include file="public:footer" /}
<script>
    $(function() {
        $.formValidator.initConfig({formid:"info_form",autotip:true});
        var title = $("#J_title");
        title.formValidator({onshow:'请填写关键词',onfocus:'请填写关键词'}).inputValidator({min:1,onerror:'请填写关键词'});
        title.bind('blur',function(){
            var val = $(this).val();
            $(this).val(val.replace(/，/g,','));
        });
    });
</script>
</body>
</html>